﻿namespace Wei8808Cms.Utility
{
    public sealed class SysContext
    {
        public static string CurrentLoginCode
        {
            get
            {
                try
                {
                    var ctx = System.Web.HttpContext.Current;
                    var value = ctx.Session["CurrentLoginCode"];
                    return value.ToString();
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                var ctx = System.Web.HttpContext.Current;
                ctx.Session["CurrentLoginCode"] = value;
            }
        }
        public static string CurrentFullName
        {
            get
            {
                try
                {
                    var ctx = System.Web.HttpContext.Current;
                    var value = ctx.Session["CurrentFullName"];
                    return value.ToString();
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                var ctx = System.Web.HttpContext.Current;
                ctx.Session["CurrentFullName"] = value;
            }
        }

        public static string CurrentRoleId
        {
            get
            {
                try
                {
                    var ctx = System.Web.HttpContext.Current;
                    var value = ctx.Session["CurrentRoleId"];
                    return value.ToString();
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                var ctx = System.Web.HttpContext.Current;
                ctx.Session["CurrentRoleId"] = value;
            }
        }
    }
}
